import Layout from '@neu/biz-core/layout'
import ParentView from '@neu/biz-core/components/ParentView'

export default [
  {
    path: '/assets',
    name: 'assets',
    redirect: 'noRedirect',
    alwaysShow: true,
    meta: {
      title: '资产管理',
      icon: 'fixed',
      module: 'dcam',
      code: 'dcam_menu_parent'
    },
    component: Layout,
    children: [
      {
        path: 'fixedAsset',
        name: 'dcam_fixedAsset',
        meta: {
          title: '资产维护',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'dcam_menu_fixedAsset'
        },
        component: () => import('@neu/dcam-ui/views/fixedAsset')
      },
      // {
      //   path: 'inventoryPlan',
      //   name: 'dcam_inventoryPlan',
      //   meta: {
      //     title: '资产盘点',
      //     icon: 'right-arrow',
      //     module: 'dcam'
      //   },
      //   component: () => import('@neu/dcam-ui/views/inventoryPlan')
      // },
      {
        path: 'inventory',
        name: 'dcam_inventory',
        meta: {
          title: '资产盘点',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'dcam_menu_inventory_parent'
        },
        component: ParentView,
        redirect: 'noRedirect',
        alwaysShow: true,
        children: [
          {
            path: 'inventoryPlan',
            name: 'dcam_inventoryPlan',
            meta: {
              title: '盘点计划',
              icon: 'right-arrow',
              module: 'dcam',
              code: 'dcam_menu_inventory_plan'
            },
            component: () => import('@neu/dcam-ui/views/inventoryPlan')
          },
          {
            path: 'inventoryDuty',
            name: 'dcam_inventoryDuty',
            // hidden: true,
            meta: {
              title: '任务安排',
              icon: 'right-arrow',
              module: 'dcam',
              code: 'dcam_menu_inventory_duty'
            },
            component: () => import('@neu/dcam-ui/views/inventoryDuty')
          },
          {
            path: 'inventoryExecuteResult',
            name: 'dcam_inventoryExecuteResult',
            hidden: true,
            meta: {
              title: '任务执行信息',
              icon: 'right-arrow',
              module: 'dcam',
              code: 'dcam_menu_inventory_executeResult'
            },
            component: () => import('@neu/dcam-ui/views/inventoryExecuteResult')
          },
          {
            path: 'inventoryExecute',
            name: 'dcam_inventoryExecute',
            // hidden: true,
            meta: {
              title: '任务执行',
              icon: 'right-arrow',
              module: 'dcam',
              code: 'dcam_menu_inventory_execute'
            },
            component: () => import('@neu/dcam-ui/views/inventoryExecute')
          },
          {
            path: 'inventoryResult',
            name: 'dcam_inventoryResult',
            // hidden: true,
            meta: {
              title: '任务确认',
              icon: 'right-arrow',
              module: 'dcam',
              code: 'dcam_menu_inventory_result'
            },
            component: () => import('@neu/dcam-ui/views/inventoryResult')
          }
        ]
      },
      {
        path: 'maintenance',
        name: 'dcam_maintenance',
        meta: {
          title: '维保管理',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'dcam_menu_maintenance_parent'
        },
        component: ParentView,
        redirect: 'noRedirect',
        alwaysShow: true,
        children: [
          {
            path: 'maintenanceChange',
            name: 'dcam_maintenanceChange',
            meta: {
              title: '维保变更',
              icon: 'right-arrow',
              module: 'dcam',
              code: 'dcam_menu_maintenance_change'
            },
            component: () => import('@neu/dcam-ui/views/maintenance/change')
          },
          {
            path: 'maintenanceReminder',
            name: 'dcam_maintenanceReminder',
            meta: {
              title: '提醒设置',
              icon: 'right-arrow',
              module: 'dcam',
              code: 'dcam_menu_maintenance_reminder'
            },
            component: () => import('@neu/dcam-ui/views/maintenance/expirationReminder')
          }
        ]
      },
      {
        path: 'manufacturer',
        name: 'dcam_manufacturer',
        meta: {
          title: '供应商档案',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'dcam_menu_manufacturer'
        },
        component: () => import('@neu/dcam-ui/views/manufacturer')
      },
      {
        path: 'contract',
        name: 'dcam_contract',
        meta: {
          title: '合同档案',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'dcam_menu_contract'
        },
        component: () => import('@neu/dcam-ui/views/contract')
      },
      {
        path: 'product',
        name: 'dcam_product',
        meta: {
          title: '产品档案',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'dcam_menu_product'
        },
        component: () => import('@neu/dcam-ui/views/product')
      }
    ]
  },
  {
    path: '/spare',
    name: 'dcam_spare',
    redirect: 'noRedirect',
    alwaysShow: true,
    meta: {
      title: '备品备件',
      icon: 'component',
      module: 'dcam',
      code: 'dcam_menu_spare_parent'
    },
    component: Layout,
    children: [
      {
        path: 'stock',
        name: 'dcam_stock',
        meta: {
          title: '库存管理',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'dcam_menu_spare_stock'
        },
        component: () => import('@neu/dcam-ui/views/stock')
      },
      {
        path: 'stockQuery',
        name: 'dcam_stockQuery',
        meta: {
          title: '库存查询',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'dcam_menu_spare_stockQuery'
        },
        component: () => import('@neu/dcam-ui/views/stockQuery')
      },
      {
        path: 'storehouse',
        name: 'dcam_storehouse',
        meta: {
          title: '仓库设置',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'dcam_menu_spare_storehouse'
        },
        component: () => import('@neu/dcam-ui/views/storehouse')
      },
      {
        path: 'spareType',
        name: 'dcam_spareType',
        meta: {
          title: '分类管理',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'dcam_menu_spare_type'
        },
        component: () => import('@neu/dcam-ui/views/spareType')
      },
      {
        path: 'goodsFile',
        name: 'dcam_goodsFile',
        meta: {
          title: '货品档案',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'dcam_menu_spare_goodsFile'
        },
        component: () => import('@neu/dcam-ui/views/goodsFile')
      }
    ]
  },
  {
    path: '/statistical',
    name: 'dcam_statistical',
    redirect: 'noRedirect',
    alwaysShow: true,
    meta: {
      title: '统计分析',
      icon: 'chart',
      module: 'dcam',
      code: 'dcam_menu_statistical_parent'
    },
    component: Layout,
    children: [
      {
        path: 'stock',
        name: 'dcam_assetStatistical',
        meta: {
          title: '预留菜单',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'dcam_menu_statistical_stock'
        },
        component: () => import('@neu/biz-core/views/dashboard/index')
      }
    ]
  },
  {
    path: '/base',
    name: 'dcam_base',
    redirect: 'noRedirect',
    alwaysShow: true,
    meta: {
      title: '基础设置',
      icon: 'settings',
      module: 'dcam',
      code: 'dcam_menu_base_parent'
    },
    component: Layout,
    children: [
      {
        path: 'assetType',
        name: 'dcam_assetType',
        meta: {
          title: '资产分类',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'dcam_menu_base_assetType'
        },
        component: () => import('@neu/dcam-ui/views/assetType')
      },
      {
        path: 'location',
        name: 'dcam_locations',
        meta: {
          title: '位置管理',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'dcam_menu_base_location'
        },
        component: () => import('@neu/dcam-ui/views/locations')
      },
      {
        path: 'assetCodeRule',
        name: 'dcam_assetCodeRule',
        meta: {
          title: '编码规则',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'dcam_menu_base_assetCodeRule'
        },
        component: () => import('@neu/dcam-ui/views/assetCodeRule')
      },
      {
        path: 'assetExtFieldConfig',
        name: 'dcam_assetExtFieldConfig',
        meta: {
          title: '属性扩展',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'dcam_menu_base_assetExtFieldConfig'
        },
        component: () => import('@neu/dcam-ui/views/assetExtFieldConfig')
      },
      {
        path: 'businessProcessType',
        name: 'dcam_businessProcessType',
        meta: {
          title: '流程模板',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'dcam_menu_base_businessProcessType'
        },
        component: () => import('@neu/dcam-ui/views/businessProcess')
      }
    ]
  },
  {
    path: '/workProcess',
    name: 'workProcess',
    redirect: 'noRedirect',
    alwaysShow: true,
    meta: {
      title: '工作流程',
      icon: 'plan',
      module: 'dcam',
      code: 'dcam_menu_workProcess'
    },
    component: Layout,
    children: [
      {
        path: 'spareConsume',
        name: 'dcam_spareConsume',
        meta: {
          title: '备件领用',
          icon: 'right-arrow',
          module: 'dcam',
          workOrderType: 'spareConsume',
          workOrderRequest: 'me',
          code: 'dcam_menu_workProcess_spareConsume'
        },
        component: () => import('@neu/dcam-ui/views/workOrder')
      },
      {
        path: 'workOrderManagement',
        name: 'dcam_workOrderManagement',
        meta: {
          title: '工单管理',
          icon: 'right-arrow',
          module: 'dcam',
          code: 'dcam_menu_workProcess_workOrderManagement_parent'
        },
        component: ParentView,
        redirect: 'noRedirect',
        alwaysShow: true,
        children: [
          {
            path: 'myWorkOrder',
            name: 'dcam_myWorkOrder',
            meta: {
              title: '我的工单',
              icon: 'right-arrow',
              module: 'dcam',
              workOrderRequest: 'me',
              code: 'dcam_menu_workProcess_workOrderManagement_myWorkOrder'
            },
            component: () => import('@neu/dcam-ui/views/workOrder')
          },
          {
            path: 'todoWorkOrder',
            name: 'dcam_todoWorkOrder',
            meta: {
              title: '待办工单',
              icon: 'right-arrow',
              module: 'dcam',
              workOrderRequest: 'todo',
              code: 'dcam_menu_workProcess_workOrderManagement_todoWorkOrder'
            },
            component: () => import('@neu/dcam-ui/views/workOrder')
          },
          {
            path: 'doneWorkOrder',
            name: 'dcom_doneWorkOrder',
            meta: {
              title: '已办工单',
              icon: 'right-arrow',
              module: 'dcom',
              workOrderRequest: 'done',
              code: 'dcam_menu_workProcess_workOrderManagement_doneWorkOrder'
            },
            component: () => import('@neu/dcam-ui/views/workOrder')
          }
        ]
      }
    ]
  },
  {
    path: '/settings',
    name: 'dcam_settings',
    redirect: 'noRedirect',
    alwaysShow: true,
    meta: {
      title: '系统设置',
      icon: 'settings',
      module: 'auth',
      code: 'dcam_menu_settings_parent'
    },
    component: Layout,
    children: [
      {
        path: 'sysTask',
        name: 'dcam_sysTask',
        meta: {
          title: '定时任务',
          icon: 'right-arrow',
          module: 'auth',
          code: 'dcam_menu_settings_sysTask'
        },
        component: () => import('@neu/dcam-ui/views/sysTask')
      },
      {
        path: 'dictionaryType',
        name: 'dcam_dictionaryType',
        meta: {
          title: '字典类型',
          icon: 'right-arrow',
          module: 'auth',
          code: 'dcam_menu_settings_dictionaryType'
        },
        component: () => import('@neu/dcam-ui/views/dictionaryType')
      },
      {
        path: 'dictionary',
        name: 'dcam_dictionary',
        meta: {
          title: '字典管理',
          icon: 'right-arrow',
          module: 'auth',
          code: 'dcam_menu_settings_dictionary'
        },
        component: () => import('@neu/dcam-ui/views/dictionary')
      },
      {
        path: 'noticeRecord',
        name: 'dcam_noticeRecord',
        meta: {
          title: '通知记录',
          icon: 'right-arrow',
          module: 'auth',
          code: 'dcam_menu_settings_noticeRecord'
        },
        component: () => import('@neu/dcam-ui/views/noticeRecord')
      },
      {
        path: 'workflowForm',
        name: 'dcam_workflowForm',
        meta: {
          title: '表单管理',
          icon: 'right-arrow',
          module: 'auth',
          code: 'dcam_menu_settings_workflowForm'
        },
        component: () => import('@neu/dcam-ui/views/workflowForm')
      },
      {
        path: 'bpmn',
        name: 'dcam_workflowEdit',
        hidden: true,
        meta: {
          title: 'BPMN',
          icon: 'right-arrow',
          code: 'dcam_menu_settings_bpmn'
        },
        component: () => import('@neu/dcam-ui/views/bpmn/edit.vue')
      },
      {
        path: 'serialNumber',
        name: 'dcam_serialNumber',
        meta: {
          title: '序列号模板',
          icon: 'right-arrow',
          module: 'auth',
          code: 'dcam_menu_settings_serialNumber'
        },
        component: () => import('@neu/dcam-ui/views/serialNumber')
      }
    ]
  }
]
